<html>
<head><meta charset="utf-8"><title>rust-analyzer not working on NixOS · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rust-analyzer.20not.20working.20on.20NixOS.html">rust-analyzer not working on NixOS</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="238051340"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rust-analyzer%20not%20working%20on%20NixOS/near/238051340" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Youssef Habri <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rust-analyzer.20not.20working.20on.20NixOS.html#238051340">(May 09 2021 at 18:08)</a>:</h4>
<p>Hi, I have just installed rust-analyzer on my NixOS install, and I'm getting an the following error:</p>
<div class="codehilite"><pre><span></span><code>thread &#39;&lt;unnamed&gt;&#39; panicked at &#39;Internal error, cycle detected:

DatabaseKeyIndex { group_index: 7, query_index: 12, key_index: 371 }
DatabaseKeyIndex { group_index: 7, query_index: 9, key_index: 45 }
&#39;, /build/rust-analyzer-unwrapped-2021-04-19-vendor.tar.gz/salsa/src/lib.rs:490:48
stack backtrace:
[...]
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
</code></pre></div>
<p>The full error is here: <a href="https://pastebin.com/3wqReiix">https://pastebin.com/3wqReiix</a></p>
<p>This happens with any kind of project, including a new empty project.<br>
I'm not sure if this is an issue with the nixos package, or its a rust-analyzer issue.<br>
Any ideas on how I can solve this problem?</p>
<p>rust-analyzer version: <code>rust-analyzer 2021-04-19</code></p>



<a name="238051745"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rust-analyzer%20not%20working%20on%20NixOS/near/238051745" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rust-analyzer.20not.20working.20on.20NixOS.html#238051745">(May 09 2021 at 18:16)</a>:</h4>
<p>that's a bug fixed in newer versions of rust-analyzer</p>



<a name="238051812"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rust-analyzer%20not%20working%20on%20NixOS/near/238051812" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Youssef Habri <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rust-analyzer.20not.20working.20on.20NixOS.html#238051812">(May 09 2021 at 18:18)</a>:</h4>
<p>Ok, that's good to hear. I'll see if I can install a newer version of rust-analyzer. Thanks</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>